%!PS-Adobe-2.0
% (C)2006 Actuate Inc.
/Helvetica findfont
12.0 scalefont setfont
%!PS-Adobe-3.0
%%Creator: Actuate Inc.
%%Pages: (atend)
%%DocumentProcessColors: Black
%%DocumentSuppliedResources: procset FOPFonts
%%EndComments
%%BeginDefaults
%%EndDefaults
%%BeginProlog
%%EndProlog
%%BeginSetup
%%BeginResource: procset FOPprocs
%%Title: Utility procedures
/getFontHeight {
  0 currentfont dup
  /FontBBox get 3 get exch
  /FontMatrix get dtransform exch pop
} def

/getUnderline {
  currentpoint pop 7 1 roll awidthshow currentpoint pop
  sub 0 currentfont dup
  /FontInfo get /UnderlineThickness get
  exch /FontMatrix get dtransform setlinewidth
  0 currentfont dup
  /FontInfo get /UnderlinePosition get
  exch /FontMatrix get dtransform
} def

/mshow {
  /fontheight getFontHeight def
  0 fontheight -1 mul rmoveto
  getUnderline gsave
  /y1 exch def
  /x1 exch def
  /y2 exch def
  /x2 exch def
  1 eq {underline}if
  1 eq {linethrough}if
  1 eq {overline}if
grestore
} def

/linethrough {
  gsave
  x1 y1 fontheight 2 div add rmoveto
  x2 y2 rlineto stroke
  grestore
} def

/overline{
  gsave
  x1 y1 fontheight add rmoveto
  x2 y2 rlineto stroke
  grestore
} def

/underline{
  gsave
  x1 y1 rmoveto
  x2 y2 rlineto stroke
  grestore
} def
/pix 3 string def
% define space for color conversions
/grays 1 string def  % space for gray scale line
/npixls 0 def
/rgbindx 0 def
% define 'colorimage' if it isn't defined
%   ('colortogray' and 'mergeprocs' come from xwd2ps
%     via xgrab)
/colorimage where   % do we know about 'colorimage'?
{ pop }           % yes: pop off the 'dict' returned
{                 % no:  define one
/colortogray {  % define an RGB->I function
/rgbdata exch store    % call input 'rgbdata'
rgbdata length 3 idiv
/npixls exch store
/rgbindx 0 store
0 1 npixls 1 sub {
grays exch
rgbdata rgbindx       get 20 mul    % Red
rgbdata rgbindx 1 add get 32 mul    % Green
rgbdata rgbindx 2 add get 12 mul    % Blue
add add 64 idiv      % I = .5G + .31R + .18B
put
/rgbindx rgbindx 3 add store
} for
grays 0 npixls getinterval
} bind def

% Utility procedure for colorimage operator.
% This procedure takes two procedures off the
% stack and merges them into a single procedure.

/mergeprocs { % def
dup length
3 -1 roll
dup
length
dup
5 1 roll
3 -1 roll
add
array cvx
dup
3 -1 roll
0 exch
putinterval
dup
4 2 roll
putinterval
} bind def

/colorimage { % def
pop pop     % remove 'false 3' operands
{colortogray} mergeprocs
image
} bind def
} ifelse          % end of 'false' case
%%EndResource
%%EndSetup
%%Page: 1 1
%%PageBoundingBox: 0 0 612 792
%%BeginPage
gsave
/Times-Roman findfont
9.0 scalefont setfont
0.0 0.0 0.0 setrgbcolor
90.00001 691.654 moveto  0  0  0 0.0 0 8#040 0.0 0  (page 1) mshow stroke
grestore
showpage
%%PageTrailer
%%EndPage
%%Page: 2 2
%%PageBoundingBox: 0 0 612 792
%%BeginPage
gsave
/Times-Roman findfont
9.0 scalefont setfont
0.0 0.0 0.0 setrgbcolor
90.00001 691.654 moveto  0  0  0 0.0 0 8#040 0.0 0  (                                         page 2) mshow stroke
grestore
showpage
%%PageTrailer
%%EndPage
%%Trailer
%%Pages: 2
%%EOF
